package com.welbell.recipes;


import android.os.Bundle;
import android.os.PersistableBundle;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;

import com.welbell.utlis.TLog;

/**
 * <pre>
 * Time  :2023/2/9 15:48
 * Author:liutao
 * dlog  :
 * desc  :
 * </pre>
 * Modification date:
 * Modified by:
 * Revised content:
 * <p>
 */
public abstract class BaseActivity<V extends ViewDataBinding> extends AppCompatActivity {

    public V dataBinding;

    protected abstract int getLayout();

    protected abstract void initView();

    protected abstract void initWork();

    protected abstract void data();

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        dataBinding = DataBindingUtil.setContentView(this,getLayout());
//        dataBinding.setLifecycleOwner(this);
        initView();
        initWork();
        data();
    }
}
